Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@aws-crypto/raw-keyring
Advanced tools
The AWS Encryption SDK for JavaScript is a client-side encryption library designed to make it easy for everyone to encrypt and decrypt data using industry standards and best practices. It uses a data format compatible with the AWS Encryption SDKs in other
@aws-crypto/raw-keyring is a package provided by AWS that allows developers to use raw keyrings for cryptographic operations. This package is part of the AWS Encryption SDK and is used to encrypt and decrypt data using raw cryptographic keys.
Encrypting Data
This feature allows you to encrypt data using a raw AES keyring. The code sample demonstrates how to create a RawAesKeyringNode and use it to encrypt a plaintext string.
const { RawAesKeyringNode } = require('@aws-crypto/raw-keyring');
const { encrypt } = require('@aws-crypto/client-node');
const keyName = 'example-key-name';
const keyNamespace = 'example-key-namespace';
const unencryptedMasterKey = Buffer.from('00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff', 'hex');
const keyring = new RawAesKeyringNode({
keyName,
keyNamespace,
unencryptedMasterKey
});
const plaintext = 'Hello, World!';
(async () => {
const { result } = await encrypt(keyring, plaintext);
console.log(result);
})();
Decrypting Data
This feature allows you to decrypt data that was encrypted using a raw AES keyring. The code sample demonstrates how to create a RawAesKeyringNode and use it to decrypt an encrypted data buffer.
const { RawAesKeyringNode } = require('@aws-crypto/raw-keyring');
const { decrypt } = require('@aws-crypto/client-node');
const keyName = 'example-key-name';
const keyNamespace = 'example-key-namespace';
const unencryptedMasterKey = Buffer.from('00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff', 'hex');
const keyring = new RawAesKeyringNode({
keyName,
keyNamespace,
unencryptedMasterKey
});
const encryptedData = /* previously encrypted data */;
(async () => {
const { plaintext } = await decrypt(keyring, encryptedData);
console.log(plaintext.toString());
})();
The 'crypto' module in Node.js provides cryptographic functionality that includes a set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify functions. Unlike @aws-crypto/raw-keyring, it does not provide a high-level abstraction for key management and encryption/decryption operations.
Node-forge is a JavaScript library that provides a native implementation of TLS (and various other cryptographic tools) in JavaScript. It offers more granular control over cryptographic operations compared to @aws-crypto/raw-keyring, but does not integrate directly with AWS services.
Stanford Javascript Crypto Library (SJCL) is a library for cryptography in JavaScript. It is designed to be secure, fast, and easy to use. SJCL provides a variety of cryptographic primitives but does not offer the same level of integration with AWS services as @aws-crypto/raw-keyring.
The AWS Encryption SDK for JavaScript is a client-side encryption library designed to make it easy for everyone to encrypt and decrypt data using industry standards and best practices. It uses a data format compatible with the AWS Encryption SDKs in other languages. For more information on the AWS Encryption SDKs in all languages, see the Developer Guide.
This package is not intended for direct use by clients. To get started with the AWS Encryption SDK for JavaScript, follow the instructions in the README.
This SDK is distributed under the Apache License, Version 2.0, see LICENSE.txt and NOTICE.txt for more information.
FAQs
The AWS Encryption SDK for JavaScript is a client-side encryption library designed to make it easy for everyone to encrypt and decrypt data using industry standards and best practices. It uses a data format compatible with the AWS Encryption SDKs in other
We found that @aws-crypto/raw-keyring demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.